import Vue from 'vue'
import VueRouter from 'vue-router'
import layout from '@/layout/index'
// import layout from '@/layout/layout'

Vue.use(VueRouter)

const routes = [
  
  {
    name: 'wxllogin',
    path: '/', //登录
    component: () => import('@/views/system/login')
    // component: () => import('@/views/system/login')
  },
  {
    name: 'wxllogin',
    path: '/wxllogin', //登录
    component: () => import('@/views/system/login')
    // component: () => import('@/views/system/login')
  },
  // {
  //   path: '/', 
  //   component: layout, 
  //   children:[
  //     {
  //       path: '/', //运维
  //       name: 'index',
  //       component: () => import('@/views/home/index'),
  //     }
  //   ]
  // },
  {
    path: '/welcomexczx', 
    component: layout, 
    redirect: '/welcomexczx', 
    children: [
      {
        path: '/welcomexczx',
        name: 'welcomexczx',
        component: () => import('@/views/system/welcomexczx')
      },
      {
        path: '/account',
        name: 'account',
        component: () => import('@/views/system/account')
      },
      {
        path: '/menu',
        name: 'menu',
        component: () => import('@/views/system/menu')
      },
      {
        path: '/power',
        name: 'power',
        component: () => import('@/views/system/power')
      },
      {
        path: '/role',
        name: 'role',
        component: () => import('@/views/system/role')
      },
      {
        name: 'loginlog',
        path: '/loginlog', 
        component: () => import('@/views/system/loginlog')
      },
      {
        name: 'errorlog',
        path: '/errorlog', 
        component: () => import('@/views/system/errorlog')
      },
      {
        name: 'apilog',
        path: '/apilog', 
        component: () => import('@/views/system/apilog')
      },
      {
        name: 'codecreate',
        path: '/codecreate', 
        component: () => import('@/views/system/codecreate')
      },
      {
        name: 'empty',
        path: '/empty', 
        component: () => import('@/views/system/empty')
      },
      {
        name: 'classroom',
        path: '/classroom', 
        component: () => import('@/views/school/classroom')
      },
    ]
  }
]

const router = new VueRouter({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes
})

export default router
